<template>
  <div class="todo-list-panel">
    <el-scrollbar class="todo-list">
      <div class="todo-item" v-for="(item, index) in menuList" :key="index" @click="handleOpenFlow(item)">
        <span class="btn-name" :title="item.label">
          {{ item.label }}
        </span>
      </div>
    </el-scrollbar>
  </div>
</template>
<script>
  import { mapState } from 'pinia'
  import { pinias } from '@/common/pinia'

  const { workStore } = pinias
  export default {
    name: 'TodoAudit',
    data() {
      return {
        menuList: [
          {
            label: '供应商档案',
            path: '/supplier/record'
          },
          {
            label: '供应商整改通知',
            path: '/supplier/rectifyInform'
          },
          {
            label: '采购需求池',
            path: '/purchaseSearchSource/purchanseDemandPool'
          },
          {
            label: '采购申请',
            path: '/purchaseSearchSource/purchaseApply'
          },
          {
            label: '定价管理',
            path: '/purchaseSearchSource/managePricing'
          }
        ]
      }
    },
    computed: {
      ...mapState(workStore, ['processCenter'])
    },
    methods: {
      handleOpenFlow(data) {
        this.$router.push({
          path: data.path
        })
      }
    }
  }
</script>
<style scoped>
  ::v-deep .todo-list .el-scrollbar__view {
    display: flex;
    flex-wrap: wrap;
  }
  ::v-deep .el-scrollbar__bar.is-horizontal {
    height: 0 !important;
  }
  ::v-deep .el-scrollbar__wrap {
    overflow-x: hidden;
  }
</style>
